<!DOCTYPE html>
<html style="font-size: 50px;">
<head>
<#include "include/head.html"/>
</head>
<body class="has-hover">
<div class="container hold-top-g">
<#include "include/top.html"/>
    <header id="titlebar">
        <div class="content">
            <div class="title-main">
                <h1>${article.name}</h1>
            </div>
        </div>
    </header>
    <div class="content">
        <div class="c-left">
            <div class="section" id="post_area">
                <div>
                    <div class="article"><!---->
                        <div class="author">
                            <div class="avatar"><a href="#"><img src="${user.img!}"></a></div>
                            <div class="meta">
                                <div class="nickname"><a href="#">${user.name!}</a></div>
                                <div class="signature">
                                    <#if friend??>
                                        <button class="default-btn" style="background-color:#cecece;">已关注</button>
                                        <#else>
                                            <button class="default-btn" onclick="location.href = '/friend/add/${user.id}'">关注</button>
                                    </#if>

                                </div>

                            </div>
                            <div class="time f-right">
                            ${article.addtime?string("yyyy-MM-dd HH:mm:ss")}
                            </div>
                        </div>
                        <div class="ql-container ql-snow article-content">${article.content!}</div>
                    </div>
                    <div style="">
                        <div class="comments">
                            <div class="head">
                                <div class="title text-t4-2 f-left">${commentList?size}条评论</div>
                                <div class="order f-right text-t4-1"></div>
                            </div>
                            <div>
                            <#if commentList?size gt 0>
                                <#list commentList as item>
                                    <div class="comment">
                                        <div class="author">
                                            <div class="avatar"><a href="/member/${item.userid}"><img
                                                    src="${item.img!}"></a></div>
                                            <div class="meta">
                                                <div class="nickname"><a href="/member/${item.userid}">${item.name}</a>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="comment-content text-t4-2">${item.content!}</div>
                                    </div>
                                </#list>

                            <#else >
                                <div class="inform text-t4-1">
                                    暂无评论
                                </div>
                            </#if>
                            </div>
                        </div>
                    <#if sessionUser??>
                        <div class="comments-add">
                            <form action="/comment/send" method="post">
                                <input type="hidden" name="articleid" value="${article.id}">
                                <div class="input-group"><textarea rows="1" name="content"></textarea></div>
                                <button class="default-btn">评论</button>

                            </form>
                        </div>
                    </#if>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>